/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: 
        linear-gradient(135deg, rgba(116, 185, 255, 0.8) 0%, rgba(9, 132, 227, 0.8) 100%),
        url('/bg1.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 背景模糊效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/bg1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.6) 0%, rgba(9, 132, 227, 0.6) 100%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-brand i {
    margin-right: 10px;
    color: #3498db;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.quick-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    color: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #3498db;
    cursor: pointer;
    margin-left: 15px;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    z-index: 900;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.menu-item.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.menu-item i {
    font-size: 18px;
    width: 20px;
}

/* 面包屑导航 */
.breadcrumb {
    position: fixed;
    top: 70px;
    left: 260px;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 800;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 30px;
    color: #666;
    font-size: 14px;
}

.breadcrumb-container i {
    margin-right: 10px;
    color: #3498db;
}

.breadcrumb-text {
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    margin-left: 260px;
    margin-top: 120px;
    padding: 30px;
    min-height: calc(100vh - 120px);
}

/* 页面通用样式 */
.page {
    display: block;
}

.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 24px;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-icon.success {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-icon.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

/* 工作台内容 */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.chart-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
}

.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.recent-activities {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.recent-activities h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3498db;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon.warning {
    background: #f39c12;
}

.activity-icon.success {
    background: #27ae60;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 14px;
}

.activity-time {
    color: #666;
    font-size: 12px;
}

/* 表单样式 */
.evaluation-form,
.hazard-controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.indicator-category {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    padding: 20px;
}

.indicator-category h4 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: #6c757d;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* 结果展示 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.result-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    text-align: center;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
}

.result-card h4 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.safety-level {
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.level-a {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.level-b {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.level-c {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.level-d {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.safety-score,
.bp-score,
.expected-score {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* 搜索和控制栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        margin-top: 70px;
        padding: 20px;
        min-height: calc(100vh - 70px);
    }
    
    .breadcrumb {
        left: 0;
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .chart-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        margin: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid,
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-bar {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f99);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeIn 0.5s ease;
}
